package org.example.iris.service.impl;

import org.example.iris.mapper.ResumeFileMapper;
import org.example.iris.entity.File;
import org.example.iris.service.ResumeFileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ResumeFileServiceImpl implements ResumeFileService {

    @Autowired
    ResumeFileMapper resumeFileMapper;

    @Override
    public File findById(Integer fileId) {
        return resumeFileMapper.findById(fileId);
    }

    @Override
    public void updateFile(File file) {
        file.setDownloadNum(file.getDownloadNum() + 1);
        resumeFileMapper.update(file);
    }
}
